from django.shortcuts import render,HttpResponse
import datetime
def books(request,name,id):
    date = datetime.datetime.now()
    list1 = [1, 2, 3, 4, 5, 6]
    return render(request,"index.html",{"yf":name,"number":id,"date":date,"list1":list1})

def happy(request):
    return HttpResponse("today is a goodday")
def index(request):
    def func():
        return 666

    class Book:
        def home(self):
            return "go home"
    p = Book()
    dict1 = {
        "xiazia":"很帅",
        "东山":"老司机",
    }
    list1=[1,2,3,4,5,6]
    return render(request,"index.html",{"dict1":dict1,"list1":list1,"func":func,"class1":Book().home})
def test(request):
    return render(request,"test.html")